bin/admin-cleanup: Port to decl-and-initialize style
authorColin Walters <walters@verbum.org>
Mon, 30 Apr 2018 15:29:47 +0000 (11:29 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 1 May 2018 13:59:07 +0000 (13:59 +0000)
No functional changes.

Closes: #1567
Approved by: jlebon

src/ostree/ot-admin-builtin-cleanup.c

index a4753030a1082c05f1419815f639bd20a9e9dc35..875d6fa3fed8534ef2aa06b400c53d075d8225c4 100644 (file)
@@ -37,21 +37,16 @@ static GOptionEntry options[] = {
 gboolean
 ot_admin_builtin_cleanup (int argc, char **argv, OstreeCommandInvocation *invocation, GCancellable *cancellable, GError **error)
 {
-  g_autoptr(GOptionContext) context = NULL;
-  g_autoptr(OstreeSysroot) sysroot = NULL;
-  gboolean ret = FALSE;
-
-  context = g_option_context_new ("");
+  g_autoptr(GOptionContext) context = g_option_context_new ("");
 
+  g_autoptr(OstreeSysroot) sysroot = NULL;
   if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
                                           OSTREE_ADMIN_BUILTIN_FLAG_SUPERUSER,
                                           invocation, &sysroot, cancellable, error))
-    goto out;
+    return FALSE;
 
   if (!ostree_sysroot_cleanup (sysroot, cancellable, error))
-    goto out;
+    return FALSE;
 
-  ret = TRUE;
- out:
-  return ret;
+  return TRUE;
 }